{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 股票分类数据\n",
    "\n",
    "- 来自 http://tushare.org/classifying.html 的股票分类数据。\n",
    "\n",
    "分类数据提供股票的分类信息数据，从股票类型的不同角度进行数据分类，在一些统计套利方法的应用中，时常会以股票的分类来做切入，比如对某些行业或概念进行阶段统计来决定近期的交易策略等。TuShare提供的分类数据主要包括以下类别：\n",
    "\n",
    "    行业分类\n",
    "    概念分类\n",
    "    地域分类\n",
    "    中小板分类\n",
    "    创业板分类\n",
    "    风险警示板分类\n",
    "    沪深300成份股及权重\n",
    "    上证50成份股\n",
    "    中证500成份股\n",
    "    终止上市股票列表\n",
    "    暂停上市股票列表\n",
    "\n",
    "行业分类\n",
    "\n",
    "在现实交易中，经常会按行业统计股票的涨跌幅或资金进出，本接口按照sina财经对沪深股票进行的行业分类，返回所有股票所属行业的信息。考虑到是一次性在线获取数据，调用接口时会有一定的延时，请在数据返回后自行将数据进行及时存储。sina财经提供的行业分类信息大致如下图所示：\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "    c_name：行业名称\n",
    "\n",
    "调用方法：\n",
    "\n",
    "import tushare as ts\n",
    "\n",
    "ts.get_industry_classified()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>c_name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>600051</td>\n",
       "      <td>宁波联合</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>600209</td>\n",
       "      <td>罗顿发展</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>600212</td>\n",
       "      <td>江泉实业</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>600256</td>\n",
       "      <td>广汇能源</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>600576</td>\n",
       "      <td>祥源文化</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>600603</td>\n",
       "      <td>广汇物流</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>600614</td>\n",
       "      <td>鹏起科技</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>600620</td>\n",
       "      <td>天宸股份</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>600622</td>\n",
       "      <td>光大嘉宝</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>600624</td>\n",
       "      <td>复旦复华</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>600647</td>\n",
       "      <td>同达创业</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>600656</td>\n",
       "      <td>退市博元</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>600687</td>\n",
       "      <td>刚泰控股</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>600701</td>\n",
       "      <td>工大高新</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>600730</td>\n",
       "      <td>中国高科</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>600770</td>\n",
       "      <td>综艺股份</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>600777</td>\n",
       "      <td>新潮能源</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>600800</td>\n",
       "      <td>天津磁卡</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>600805</td>\n",
       "      <td>悦达投资</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>600811</td>\n",
       "      <td>东方集团</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>600832</td>\n",
       "      <td>东方明珠</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>600846</td>\n",
       "      <td>同济科技</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>600892</td>\n",
       "      <td>大晟文化</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>000008</td>\n",
       "      <td>神州高铁</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>000301</td>\n",
       "      <td>东方市场</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>000576</td>\n",
       "      <td>广东甘化</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>000632</td>\n",
       "      <td>三木集团</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>000633</td>\n",
       "      <td>合金投资</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>000652</td>\n",
       "      <td>泰达股份</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>000701</td>\n",
       "      <td>厦门信达</td>\n",
       "      <td>综合行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2878</th>\n",
       "      <td>600983</td>\n",
       "      <td>惠而浦</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2879</th>\n",
       "      <td>603366</td>\n",
       "      <td>日出东方</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2880</th>\n",
       "      <td>603519</td>\n",
       "      <td>立霸股份</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2881</th>\n",
       "      <td>000016</td>\n",
       "      <td>深康佳Ａ</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2882</th>\n",
       "      <td>000100</td>\n",
       "      <td>TCL 集团</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2883</th>\n",
       "      <td>000333</td>\n",
       "      <td>美的集团</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2884</th>\n",
       "      <td>000418</td>\n",
       "      <td>小天鹅Ａ</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2885</th>\n",
       "      <td>000521</td>\n",
       "      <td>美菱电器</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2886</th>\n",
       "      <td>000527</td>\n",
       "      <td>美的电器</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2887</th>\n",
       "      <td>000533</td>\n",
       "      <td>万 家 乐</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2888</th>\n",
       "      <td>000541</td>\n",
       "      <td>佛山照明</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2889</th>\n",
       "      <td>000651</td>\n",
       "      <td>格力电器</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2890</th>\n",
       "      <td>000921</td>\n",
       "      <td>海信科龙</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2891</th>\n",
       "      <td>002005</td>\n",
       "      <td>德豪润达</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2892</th>\n",
       "      <td>002032</td>\n",
       "      <td>苏 泊 尔</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2893</th>\n",
       "      <td>002035</td>\n",
       "      <td>华帝股份</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2894</th>\n",
       "      <td>002076</td>\n",
       "      <td>雪 莱 特</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2895</th>\n",
       "      <td>002242</td>\n",
       "      <td>九阳股份</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2896</th>\n",
       "      <td>002260</td>\n",
       "      <td>德奥通航</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2897</th>\n",
       "      <td>002290</td>\n",
       "      <td>中科新材</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2898</th>\n",
       "      <td>002403</td>\n",
       "      <td>爱仕达</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2899</th>\n",
       "      <td>002429</td>\n",
       "      <td>兆驰股份</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2900</th>\n",
       "      <td>002473</td>\n",
       "      <td>*ST圣莱</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2901</th>\n",
       "      <td>002508</td>\n",
       "      <td>老板电器</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2902</th>\n",
       "      <td>002543</td>\n",
       "      <td>万和电气</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2903</th>\n",
       "      <td>002668</td>\n",
       "      <td>奥马电器</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2904</th>\n",
       "      <td>002677</td>\n",
       "      <td>浙江美大</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2905</th>\n",
       "      <td>002681</td>\n",
       "      <td>奋达科技</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2906</th>\n",
       "      <td>002705</td>\n",
       "      <td>新宝股份</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2907</th>\n",
       "      <td>002723</td>\n",
       "      <td>金莱特</td>\n",
       "      <td>家电行业</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2908 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        code    name c_name\n",
       "0     600051    宁波联合   综合行业\n",
       "1     600209    罗顿发展   综合行业\n",
       "2     600212    江泉实业   综合行业\n",
       "3     600256    广汇能源   综合行业\n",
       "4     600576    祥源文化   综合行业\n",
       "5     600603    广汇物流   综合行业\n",
       "6     600614    鹏起科技   综合行业\n",
       "7     600620    天宸股份   综合行业\n",
       "8     600622    光大嘉宝   综合行业\n",
       "9     600624    复旦复华   综合行业\n",
       "10    600647    同达创业   综合行业\n",
       "11    600656    退市博元   综合行业\n",
       "12    600687    刚泰控股   综合行业\n",
       "13    600701    工大高新   综合行业\n",
       "14    600730    中国高科   综合行业\n",
       "15    600770    综艺股份   综合行业\n",
       "16    600777    新潮能源   综合行业\n",
       "17    600800    天津磁卡   综合行业\n",
       "18    600805    悦达投资   综合行业\n",
       "19    600811    东方集团   综合行业\n",
       "20    600832    东方明珠   综合行业\n",
       "21    600846    同济科技   综合行业\n",
       "22    600892    大晟文化   综合行业\n",
       "23    000008    神州高铁   综合行业\n",
       "24    000301    东方市场   综合行业\n",
       "25    000576    广东甘化   综合行业\n",
       "26    000632    三木集团   综合行业\n",
       "27    000633    合金投资   综合行业\n",
       "28    000652    泰达股份   综合行业\n",
       "29    000701    厦门信达   综合行业\n",
       "...      ...     ...    ...\n",
       "2878  600983     惠而浦   家电行业\n",
       "2879  603366    日出东方   家电行业\n",
       "2880  603519    立霸股份   家电行业\n",
       "2881  000016    深康佳Ａ   家电行业\n",
       "2882  000100  TCL 集团   家电行业\n",
       "2883  000333    美的集团   家电行业\n",
       "2884  000418    小天鹅Ａ   家电行业\n",
       "2885  000521    美菱电器   家电行业\n",
       "2886  000527    美的电器   家电行业\n",
       "2887  000533   万 家 乐   家电行业\n",
       "2888  000541    佛山照明   家电行业\n",
       "2889  000651    格力电器   家电行业\n",
       "2890  000921    海信科龙   家电行业\n",
       "2891  002005    德豪润达   家电行业\n",
       "2892  002032   苏 泊 尔   家电行业\n",
       "2893  002035    华帝股份   家电行业\n",
       "2894  002076   雪 莱 特   家电行业\n",
       "2895  002242    九阳股份   家电行业\n",
       "2896  002260    德奥通航   家电行业\n",
       "2897  002290    中科新材   家电行业\n",
       "2898  002403     爱仕达   家电行业\n",
       "2899  002429    兆驰股份   家电行业\n",
       "2900  002473   *ST圣莱   家电行业\n",
       "2901  002508    老板电器   家电行业\n",
       "2902  002543    万和电气   家电行业\n",
       "2903  002668    奥马电器   家电行业\n",
       "2904  002677    浙江美大   家电行业\n",
       "2905  002681    奋达科技   家电行业\n",
       "2906  002705    新宝股份   家电行业\n",
       "2907  002723     金莱特   家电行业\n",
       "\n",
       "[2908 rows x 3 columns]"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import tushare as ts\n",
    "\n",
    "ts.get_industry_classified()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 概念分类\n",
    "\n",
    "返回股票概念的分类数据，现实的二级市场交易中，经常会以”概念”来炒作，在数据分析过程中，可根据概念分类监测资金等信息的变动情况。本接口是一次性在线获取数据，调用接口时会有一定的延时，请在数据返回后自行将数据进行及时存储。sina财经提供的概念分类信息大致如下图所示：\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "    c_name：概念名称\n",
    "\n",
    "调用方法：\n",
    "\n",
    "import tushare as ts\n",
    "\n",
    "ts.get_concept_classified()\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 地域分类\n",
    "\n",
    "按地域对股票进行分类，即查找出哪些股票属于哪个省份。\n",
    "\n",
    "参数说明：\n",
    "\n",
    "    file_path:文件路径，默认为None即由TuShare提供，可以设定自己的股票文件路径。\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "    area：地域名称\n",
    "\n",
    "调用方法：\n",
    "\n",
    "import tushare as ts\n",
    "\n",
    "ts.get_area_classified()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>area</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>300153</td>\n",
       "      <td>科泰电源</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>300398</td>\n",
       "      <td>飞凯材料</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>300253</td>\n",
       "      <td>卫宁健康</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>603131</td>\n",
       "      <td>上海沪工</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>600503</td>\n",
       "      <td>华丽家族</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>601021</td>\n",
       "      <td>春秋航空</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>600021</td>\n",
       "      <td>上海电力</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>300590</td>\n",
       "      <td>移为通信</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>600615</td>\n",
       "      <td>丰华股份</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>603683</td>\n",
       "      <td>晶华新材</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>600613</td>\n",
       "      <td>神奇制药</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>600097</td>\n",
       "      <td>开创国际</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>600171</td>\n",
       "      <td>上海贝岭</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>603918</td>\n",
       "      <td>金桥信息</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>300067</td>\n",
       "      <td>安诺其</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>603232</td>\n",
       "      <td>格尔软件</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>300272</td>\n",
       "      <td>开能健康</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>603083</td>\n",
       "      <td>剑桥科技</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>601607</td>\n",
       "      <td>上海医药</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>002561</td>\n",
       "      <td>徐家汇</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>600630</td>\n",
       "      <td>龙头股份</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>300262</td>\n",
       "      <td>巴安水务</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>603729</td>\n",
       "      <td>龙韵股份</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>601211</td>\n",
       "      <td>国泰君安</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>300126</td>\n",
       "      <td>锐奇股份</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>600708</td>\n",
       "      <td>光明地产</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>601968</td>\n",
       "      <td>宝钢包装</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>600675</td>\n",
       "      <td>中华企业</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>002565</td>\n",
       "      <td>顺灏股份</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>603855</td>\n",
       "      <td>华荣股份</td>\n",
       "      <td>上海</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3508</th>\n",
       "      <td>600356</td>\n",
       "      <td>恒丰纸业</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3509</th>\n",
       "      <td>603567</td>\n",
       "      <td>珍宝岛</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3510</th>\n",
       "      <td>600179</td>\n",
       "      <td>安通控股</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3511</th>\n",
       "      <td>002737</td>\n",
       "      <td>葵花药业</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3512</th>\n",
       "      <td>600371</td>\n",
       "      <td>万向德农</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3513</th>\n",
       "      <td>600705</td>\n",
       "      <td>中航资本</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3514</th>\n",
       "      <td>600664</td>\n",
       "      <td>哈药股份</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3515</th>\n",
       "      <td>603023</td>\n",
       "      <td>威帝股份</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3516</th>\n",
       "      <td>600829</td>\n",
       "      <td>人民同泰</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3517</th>\n",
       "      <td>600701</td>\n",
       "      <td>*ST工新</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3518</th>\n",
       "      <td>300040</td>\n",
       "      <td>九洲电气</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3519</th>\n",
       "      <td>600598</td>\n",
       "      <td>北大荒</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3520</th>\n",
       "      <td>300489</td>\n",
       "      <td>中飞股份</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3521</th>\n",
       "      <td>600038</td>\n",
       "      <td>中直股份</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3522</th>\n",
       "      <td>002698</td>\n",
       "      <td>博实股份</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3523</th>\n",
       "      <td>600178</td>\n",
       "      <td>东安动力</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3524</th>\n",
       "      <td>600187</td>\n",
       "      <td>国中水务</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3525</th>\n",
       "      <td>600811</td>\n",
       "      <td>东方集团</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3526</th>\n",
       "      <td>601011</td>\n",
       "      <td>宝泰隆</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3527</th>\n",
       "      <td>600182</td>\n",
       "      <td>S佳通</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3528</th>\n",
       "      <td>000587</td>\n",
       "      <td>金洲慈航</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3529</th>\n",
       "      <td>600853</td>\n",
       "      <td>龙建股份</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3530</th>\n",
       "      <td>000711</td>\n",
       "      <td>京蓝科技</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3531</th>\n",
       "      <td>002437</td>\n",
       "      <td>誉衡药业</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3532</th>\n",
       "      <td>600289</td>\n",
       "      <td>*ST信通</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3533</th>\n",
       "      <td>600891</td>\n",
       "      <td>秋林集团</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3534</th>\n",
       "      <td>600864</td>\n",
       "      <td>哈投股份</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3535</th>\n",
       "      <td>600095</td>\n",
       "      <td>哈高科</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3536</th>\n",
       "      <td>000985</td>\n",
       "      <td>大庆华科</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3537</th>\n",
       "      <td>601106</td>\n",
       "      <td>中国一重</td>\n",
       "      <td>黑龙江</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3538 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        code   name area\n",
       "0     300153   科泰电源   上海\n",
       "1     300398   飞凯材料   上海\n",
       "2     300253   卫宁健康   上海\n",
       "3     603131   上海沪工   上海\n",
       "4     600503   华丽家族   上海\n",
       "5     601021   春秋航空   上海\n",
       "6     600021   上海电力   上海\n",
       "7     300590   移为通信   上海\n",
       "8     600615   丰华股份   上海\n",
       "9     603683   晶华新材   上海\n",
       "10    600613   神奇制药   上海\n",
       "11    600097   开创国际   上海\n",
       "12    600171   上海贝岭   上海\n",
       "13    603918   金桥信息   上海\n",
       "14    300067    安诺其   上海\n",
       "15    603232   格尔软件   上海\n",
       "16    300272   开能健康   上海\n",
       "17    603083   剑桥科技   上海\n",
       "18    601607   上海医药   上海\n",
       "19    002561    徐家汇   上海\n",
       "20    600630   龙头股份   上海\n",
       "21    300262   巴安水务   上海\n",
       "22    603729   龙韵股份   上海\n",
       "23    601211   国泰君安   上海\n",
       "24    300126   锐奇股份   上海\n",
       "25    600708   光明地产   上海\n",
       "26    601968   宝钢包装   上海\n",
       "27    600675   中华企业   上海\n",
       "28    002565   顺灏股份   上海\n",
       "29    603855   华荣股份   上海\n",
       "...      ...    ...  ...\n",
       "3508  600356   恒丰纸业  黑龙江\n",
       "3509  603567    珍宝岛  黑龙江\n",
       "3510  600179   安通控股  黑龙江\n",
       "3511  002737   葵花药业  黑龙江\n",
       "3512  600371   万向德农  黑龙江\n",
       "3513  600705   中航资本  黑龙江\n",
       "3514  600664   哈药股份  黑龙江\n",
       "3515  603023   威帝股份  黑龙江\n",
       "3516  600829   人民同泰  黑龙江\n",
       "3517  600701  *ST工新  黑龙江\n",
       "3518  300040   九洲电气  黑龙江\n",
       "3519  600598    北大荒  黑龙江\n",
       "3520  300489   中飞股份  黑龙江\n",
       "3521  600038   中直股份  黑龙江\n",
       "3522  002698   博实股份  黑龙江\n",
       "3523  600178   东安动力  黑龙江\n",
       "3524  600187   国中水务  黑龙江\n",
       "3525  600811   东方集团  黑龙江\n",
       "3526  601011    宝泰隆  黑龙江\n",
       "3527  600182    S佳通  黑龙江\n",
       "3528  000587   金洲慈航  黑龙江\n",
       "3529  600853   龙建股份  黑龙江\n",
       "3530  000711   京蓝科技  黑龙江\n",
       "3531  002437   誉衡药业  黑龙江\n",
       "3532  600289  *ST信通  黑龙江\n",
       "3533  600891   秋林集团  黑龙江\n",
       "3534  600864   哈投股份  黑龙江\n",
       "3535  600095    哈高科  黑龙江\n",
       "3536  000985   大庆华科  黑龙江\n",
       "3537  601106   中国一重  黑龙江\n",
       "\n",
       "[3538 rows x 3 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import tushare as ts\n",
    "\n",
    "ts.get_area_classified()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 中小板分类\n",
    "\n",
    "获取中小板股票数据，即查找所有002开头的股票\n",
    "\n",
    "参数说明：\n",
    "\n",
    "    file_path:文件路径，默认为None即由TuShare提供，可以设定自己的股票文件路径。\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "\n",
    "调用方法：\n",
    "\n",
    "import tushare as ts\n",
    "\n",
    "ts.get_sme_classified()\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 创业板分类\n",
    "\n",
    "获取创业板股票数据，即查找所有300开头的股票\n",
    "\n",
    "参数说明：\n",
    "\n",
    "    file_path:文件路径，默认为None即由TuShare提供，可以设定自己的股票文件路径。\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "\n",
    "调用方法：\n",
    "\n",
    "import tushare as ts\n",
    "\n",
    "ts.get_gem_classified()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>300001</td>\n",
       "      <td>特锐德</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>300002</td>\n",
       "      <td>神州泰岳</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>300003</td>\n",
       "      <td>乐普医疗</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>300004</td>\n",
       "      <td>南风股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>300005</td>\n",
       "      <td>探路者</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>300006</td>\n",
       "      <td>莱美药业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>300007</td>\n",
       "      <td>汉威科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>300008</td>\n",
       "      <td>天海防务</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>300009</td>\n",
       "      <td>安科生物</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>300010</td>\n",
       "      <td>立思辰</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>300011</td>\n",
       "      <td>鼎汉技术</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>300012</td>\n",
       "      <td>华测检测</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>300013</td>\n",
       "      <td>新宁物流</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>300014</td>\n",
       "      <td>亿纬锂能</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>300015</td>\n",
       "      <td>爱尔眼科</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>300016</td>\n",
       "      <td>北陆药业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>300017</td>\n",
       "      <td>网宿科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>300018</td>\n",
       "      <td>中元股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>300019</td>\n",
       "      <td>硅宝科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>300020</td>\n",
       "      <td>银江股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>300021</td>\n",
       "      <td>大禹节水</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>300022</td>\n",
       "      <td>吉峰农机</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>300023</td>\n",
       "      <td>宝德股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>300024</td>\n",
       "      <td>机器人</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>300025</td>\n",
       "      <td>华星创业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>300026</td>\n",
       "      <td>红日药业</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>300027</td>\n",
       "      <td>华谊兄弟</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>300028</td>\n",
       "      <td>*金亚</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>300029</td>\n",
       "      <td>天龙光电</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>300030</td>\n",
       "      <td>阳普医疗</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>700</th>\n",
       "      <td>300716</td>\n",
       "      <td>国立科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>701</th>\n",
       "      <td>300717</td>\n",
       "      <td>华信新材</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>702</th>\n",
       "      <td>300718</td>\n",
       "      <td>长盛轴承</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>703</th>\n",
       "      <td>300719</td>\n",
       "      <td>安达维尔</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>704</th>\n",
       "      <td>300720</td>\n",
       "      <td>海川智能</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>705</th>\n",
       "      <td>300721</td>\n",
       "      <td>怡达股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>706</th>\n",
       "      <td>300722</td>\n",
       "      <td>新余国科</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>707</th>\n",
       "      <td>300723</td>\n",
       "      <td>一品红</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>708</th>\n",
       "      <td>300724</td>\n",
       "      <td>捷佳伟创</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>709</th>\n",
       "      <td>300725</td>\n",
       "      <td>药石科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>710</th>\n",
       "      <td>300726</td>\n",
       "      <td>宏达电子</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>711</th>\n",
       "      <td>300727</td>\n",
       "      <td>润禾材料</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>712</th>\n",
       "      <td>300729</td>\n",
       "      <td>乐歌股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>713</th>\n",
       "      <td>300730</td>\n",
       "      <td>科创信息</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>714</th>\n",
       "      <td>300731</td>\n",
       "      <td>科创新源</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>715</th>\n",
       "      <td>300732</td>\n",
       "      <td>设研院</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>716</th>\n",
       "      <td>300733</td>\n",
       "      <td>西菱动力</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>717</th>\n",
       "      <td>300735</td>\n",
       "      <td>光弘科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>718</th>\n",
       "      <td>300736</td>\n",
       "      <td>百华悦邦</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>719</th>\n",
       "      <td>300737</td>\n",
       "      <td>科顺股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>720</th>\n",
       "      <td>300738</td>\n",
       "      <td>奥飞数据</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>721</th>\n",
       "      <td>300739</td>\n",
       "      <td>明阳电路</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>722</th>\n",
       "      <td>300740</td>\n",
       "      <td>御家汇</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>723</th>\n",
       "      <td>300741</td>\n",
       "      <td>华宝股份</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>724</th>\n",
       "      <td>300742</td>\n",
       "      <td>越博动力</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>725</th>\n",
       "      <td>300743</td>\n",
       "      <td>天地数码</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>726</th>\n",
       "      <td>300745</td>\n",
       "      <td>欣锐科技</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>727</th>\n",
       "      <td>300746</td>\n",
       "      <td>汉嘉设计</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>728</th>\n",
       "      <td>300747</td>\n",
       "      <td>锐科激光</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>729</th>\n",
       "      <td>300750</td>\n",
       "      <td>宁德时代</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>730 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       code  name\n",
       "0    300001   特锐德\n",
       "1    300002  神州泰岳\n",
       "2    300003  乐普医疗\n",
       "3    300004  南风股份\n",
       "4    300005   探路者\n",
       "5    300006  莱美药业\n",
       "6    300007  汉威科技\n",
       "7    300008  天海防务\n",
       "8    300009  安科生物\n",
       "9    300010   立思辰\n",
       "10   300011  鼎汉技术\n",
       "11   300012  华测检测\n",
       "12   300013  新宁物流\n",
       "13   300014  亿纬锂能\n",
       "14   300015  爱尔眼科\n",
       "15   300016  北陆药业\n",
       "16   300017  网宿科技\n",
       "17   300018  中元股份\n",
       "18   300019  硅宝科技\n",
       "19   300020  银江股份\n",
       "20   300021  大禹节水\n",
       "21   300022  吉峰农机\n",
       "22   300023  宝德股份\n",
       "23   300024   机器人\n",
       "24   300025  华星创业\n",
       "25   300026  红日药业\n",
       "26   300027  华谊兄弟\n",
       "27   300028   *金亚\n",
       "28   300029  天龙光电\n",
       "29   300030  阳普医疗\n",
       "..      ...   ...\n",
       "700  300716  国立科技\n",
       "701  300717  华信新材\n",
       "702  300718  长盛轴承\n",
       "703  300719  安达维尔\n",
       "704  300720  海川智能\n",
       "705  300721  怡达股份\n",
       "706  300722  新余国科\n",
       "707  300723   一品红\n",
       "708  300724  捷佳伟创\n",
       "709  300725  药石科技\n",
       "710  300726  宏达电子\n",
       "711  300727  润禾材料\n",
       "712  300729  乐歌股份\n",
       "713  300730  科创信息\n",
       "714  300731  科创新源\n",
       "715  300732   设研院\n",
       "716  300733  西菱动力\n",
       "717  300735  光弘科技\n",
       "718  300736  百华悦邦\n",
       "719  300737  科顺股份\n",
       "720  300738  奥飞数据\n",
       "721  300739  明阳电路\n",
       "722  300740   御家汇\n",
       "723  300741  华宝股份\n",
       "724  300742  越博动力\n",
       "725  300743  天地数码\n",
       "726  300745  欣锐科技\n",
       "727  300746  汉嘉设计\n",
       "728  300747  锐科激光\n",
       "729  300750  宁德时代\n",
       "\n",
       "[730 rows x 2 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import tushare as ts\n",
    "\n",
    "ts.get_gem_classified()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 风险警示板分类\n",
    "\n",
    "获取风险警示板股票数据，即查找所有st股票\n",
    "\n",
    "参数说明：\n",
    "\n",
    "    file_path:文件路径，默认为None即由TuShare提供，可以设定自己的股票文件路径。\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "\n",
    "调用方法：\n",
    "\n",
    "import tushare as ts\n",
    "\n",
    "ts.get_st_classified()\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 沪深300成份及权重\n",
    "\n",
    "获取沪深300当前成份股及所占权重\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code :股票代码\n",
    "    name :股票名称\n",
    "    date :日期\n",
    "    weight:权重\n",
    "\n",
    "调用方法：\n",
    "```\n",
    "import tushare as ts\n",
    "ts.get_hs300s()\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 上证50成份股\n",
    "\n",
    "获取上证50成份股\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "\n",
    "调用方法：\n",
    "```\n",
    "import tushare as ts\n",
    "ts.get_sz50s()\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 中证500成份股\n",
    "\n",
    "获取中证500成份股\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "\n",
    "调用方法：\n",
    "```\n",
    "import tushare as ts\n",
    "ts.get_zz500s()\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 终止上市股票列表\n",
    "\n",
    "获取已经被终止上市的股票列表，数据从上交所获取，目前只有在上海证券交易所交易被终止的股票。\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "    oDate:上市日期\n",
    "    tDate:终止上市日期\n",
    "\n",
    "调用方法：\n",
    "```\n",
    "import tushare as ts\n",
    "ts.get_terminated()\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "HTTP Error 403: Forbidden\n"
     ]
    }
   ],
   "source": [
    "import tushare as ts\n",
    "ts.get_terminated()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 暂停上市股票列表\n",
    "\n",
    "获取被暂停上市的股票列表，数据从上交所获取，目前只有在上海证券交易所交易被终止的股票。\n",
    "\n",
    "返回值说明：\n",
    "\n",
    "    code：股票代码\n",
    "    name：股票名称\n",
    "    oDate:上市日期\n",
    "    tDate:暂停上市日期\n",
    "\n",
    "调用方法：\n",
    "```\n",
    "import tushare as ts\n",
    "ts.get_suspended()\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "HTTP Error 403: Forbidden\n"
     ]
    }
   ],
   "source": [
    "import tushare as ts\n",
    "ts.get_suspended()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
